<template>
  <div class="home">
<!--    <img alt="Vue logo" style="width: 100%"  fit="contain" :src="require('@/assets/images/bg.jpg')">-->
    <van-swipe :autoplay="3000" style="width: 100%;height: 200px"  lazy-render>
      <van-swipe-item    v-for="image in images" :key="image">
        <img :src="image" style="width: 100%;height: 100%"/>
      </van-swipe-item>
    </van-swipe>
    <Home msg="Welcome to Your Vue.js App"/>
  </div>

</template>

<script>
// @ is an alias to /src
import Home from '@/components/Home.vue'
// import axios from 'axios'

// 1. 引入你需要的组件
import { Button,Grid, GridItem, List ,Swipe, SwipeItem } from 'vant';
// 2. 引入组件样式
import 'vant/lib/index.css';

export default {
  name: 'HomeView',

  backgroundImgUrl: require('@/assets/images/bg.jpg'),
  components: {
    Home,
    [Button.name]: Button,
    [Grid.name]: Grid,
    [GridItem.name]: GridItem,
    [List.name]: List,
    [Swipe.name]: Swipe,
    [SwipeItem.name]: SwipeItem
  },
  setup() {
    const images = [
      require('@/assets/images/bg.jpg'),
      // 'https://fastly.jsdelivr.net/npm/@vant/assets/apple-2.jpeg',
    ];
    return { images };
  },
  mounted() {
    console.log(this.$route.query['prjid'])
  }
}
</script>
